#!/bin/bash
########################################################################
# XXPROJECTEXECXX - XXPROJECTEXECXX main entry
# Copyright (C) 2013 XXAUTHORNAMEXX <XXAUTHOREMAILXX>
#
# These comments cannot be remove or edited and should remain intact
# because this file comments is an extension to the GPL3 license.
# This software file is covered by GPL version 3 license.
# Please see the LICENSE and gpl3.txt or gpl3.htm in doc directory
# for the license agreement, if its not exist, write to the 
# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
# Modification below this line is allowed
########################################################################
# Extra credits to:
#
########################################################################
# Notes:
# Put notes to other future developer/contributor here
#
########################################################################
#define gtkdialog
if [ "`which gtkdialog4`" ]; then
 GTKDIALOG=gtkdialog4
elif [ "`which gtkdialog3`" ]; then
 GTKDIALOG=gtkdialog3
else
 GTKDIALOG=gtkdialog
fi
export PROGNAME=XXPROJECTEXECXX
export PROGVER=20130301

if [ -d "/usr/share/$PROGNAME" ]
then
	export PROGDIR=/usr/share/$PROGNAME
else
	export PROGDIR=/root/projects/$PROGNAME
fi
export PROGDLG=$PROGDIR/dlg
export PROGDOC=$PROGDIR/doc
export PROGLIB=$PROGDIR/lib
export PROGPIX=$PROGDIR/pix
export PROGDATA=$PROGDIR/data
export PROGTMP=$HOME/.config/$PROGNAME/tmp
export PROGPREF=$HOME/.config/$PROGNAME/preference
export PROGAUTHOR="XXAUTHORNAMEXX"
export PROGEMAIL="XXAUTHOREMAILXX"
mkdir -p "$PROGTMP"
mkdir -p "$PROGPREF"

export DEBUG=true
source $PROGLIB/common.sh
bootstrap
# Bootstrap complete, MAIN_DIALOG is auto sourced from dlg/ and defined through project properties
# This file here is just for execution
# Please use this as versioning: version = date +%Y%m%d
# uncomment to get the MAIN_DIALOG XML
# echo $MAIN_DIALOG > $PROGDIR/XXPROJECTEXECXX.xml
$GTKDIALOG --center --program=MAIN_DIALOG
